package cn.tedu.qxhouserent.house.pojo.param;

import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

@Data
@Accessors(chain = true)
public class UserLoginInfoParam implements Serializable {
    @NotEmpty(message = "用户登录失败，请填写用户名！")
    @Pattern(regexp = "^[a-zA-Z][a-zA-Z0-9_-]{3,15}$", message = "用户登录失败，用户名必须是4~16个由字母、数字、下划线、减号组成的字符，且第1个字符必须是字母！")
    private String username;
    @NotEmpty(message = "用户登录失败，请填写密码！")
    @Pattern(regexp = "^.{4,16}$", message = "用户登录失败，密码必须是4~16字符！")
    private String password;
}
